package com.micro.modual.service.impl;

import com.micro.common.MicroResponseCode;
import com.micro.core.exception.BizException;
import com.micro.core.frame.service.impl.AbstractBasicsServiceImpl;
import com.micro.core.resp.RespJson;
import com.micro.modual.entity.Feedback;
import com.micro.modual.extension.FeedbackExtension;
import com.micro.modual.mapper.FeedbackMapper;
import com.micro.modual.model.bo.feedback.FeedbackBO;
import com.micro.modual.service.FeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
*  <h1>意见反馈表  实现</h1>
 * @author LevelCoder
 * @version V1.0.0
 * @email LevelCoder@126.com
 * @date 2020-08-04 00:11:10
 */
@Service("feedbackService")
public class FeedbackServiceImpl extends AbstractBasicsServiceImpl<Feedback,Long> implements FeedbackService {

    @Autowired
    private FeedbackMapper feedbackMapper;


    /**
     * <h2>根据主键编号删除意见反馈表信息</h2>
     * @param id  意见反馈表 主键编号
     * @return  {@link RespJson} 返回结果基础类
     */

    @Override
    public RespJson deleteFeedback(Long id) {
        feedbackMapper.deleteByPrimaryKey(id);
        return new RespJson(MicroResponseCode.SUCCESS.getResponseCode(),MicroResponseCode.SUCCESS.getResponseMessage());
    }

    /**
     * <h2>根据主键编号修改意见反馈查看状态</h2>
     * @param id 意见反馈表 主键编号
     */
    @Override
    public void modifyFeedBackStatus(Long id) {
        feedbackMapper.modifyFeedBackStatus(id);
    }

}
